package com.efast.dmom.aps.datahandlers;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.efast.dmom.aps.dao.DmomIdDao;

@Component
public class TDataHandler {
	@Autowired
	private  DmomIdDao dmomIdDao;
	
	
	private static TDataHandler dataHandlerUtils;
	
	@PostConstruct
    public void init() {
		dataHandlerUtils = this;
    }
	
	public static long getDmomId() {
		//平台ID，数据库唯一
		return dataHandlerUtils.dmomIdDao.getDmomId();
	}
	public static int getDmomPid() {
		//平台PID
		return dataHandlerUtils.dmomIdDao.getDmomPid();
	}
	public static int increaseDmomPid() {
		//平台PID,增加pid
		return dataHandlerUtils.dmomIdDao.updateDmomPid();
	}
}
